Skip to content

Added Okta provider support with private key JWT authentication#31

Closed
hixichen wants to merge 4 commits intoopenbao:mainfrom
hixichen:chenxi/okta-provider
Closed

Added Okta provider support with private key JWT authentication#31
hixichen wants to merge 4 commits intoopenbao:mainfrom
hixichen:chenxi/okta-provider

Conversation

@hixichen
Copy link
Copy Markdown

Add Okta provider with private key JWT authentication support

  • Implement Okta OAuth2 provider supporting for private key JWT authentication methods
  • Add support for client_credentials grant type using Private Key JWT (RFC 7523)
  • Include comprehensive test coverage for both authentication methods
  • Update documentation with Okta configuration examples

hixichen and others added 4 commits September 26, 2025 22:34
- Implement Okta OAuth2 provider supporting both client secret and private key JWT authentication methods
- Add support for client_credentials grant type using Private Key JWT (RFC 7523)
- Include comprehensive test coverage for both authentication methods
- Update documentation with Okta configuration examples

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Add better error handling with errmark.MarkUser for authentication failures
- Add input validation for client ID in JWT assertion creation
- Add HTTP client timeout configuration (30s)
- Add comprehensive test coverage for client secret authentication
- Add security constants for JWT lifetime limits

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Test Coverage Improvements:
- Add comprehensive tests for OktaFactory with various configurations
- Add tests for refresh token functionality
- Add error scenario tests for ClientCredentials method
- Add JWT creation error tests (missing client ID, no private key)
- Add tests for provider methods (Version, Public, AuthCodeURL)
- Coverage improved from 69.7% to 88.0% for OktaFactory
- Coverage improved from 75.6% to 87.8% for ClientCredentials
- Coverage improved from 0% to 85.7% for AuthCodeURL
- Coverage improved from 0% to 88.9% for RefreshToken

Documentation Improvements:
- Add comprehensive Okta provider section to README
- Document both client secret and private key JWT authentication methods
- Include configuration examples and usage notes
- Add security recommendations and technical details
- Document supported OAuth2 flows and requirements

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Use content from 'Client credentials with Private Key JWT Authentication' section
- Maintain consistency with existing documentation format
- Keep the same configuration examples and output format

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Copy link
Copy Markdown
Collaborator

@DrDaveD DrDaveD left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please fix linter error.

The commits all will need to be re-done with git commit -s for the DCO.

Comment thread CHANGELOG.md
Comment thread coverage.out
Comment thread README.md
@JanMa
Copy link
Copy Markdown
Member

JanMa commented Nov 28, 2025

Hello @hixichen
thank you for your contribution but we cannot accept it as is because of your use of AI when creating the PR.
See our Contribution Guidelines for more information.

@DrDaveD DrDaveD closed this Dec 1, 2025
@hixichen
Copy link
Copy Markdown
Author

Thanks for the clarification on the AI policy! Just to make sure I fully understand the DCO requirement: does this mean every line must be manually typed, or is standard IDE autocomplete acceptable as long as generative AI plugins are disabled?

@cipherboy
Copy link
Copy Markdown
Member

Hey @hixichen! No, you can use autocomplete. Its just that we want to avoid blocks of AI generated code.

You can see some more about that here: https://github.com/openbao/openbao/tree/main/CONTRIBUTING.md and https://openbao.org/docs/contributing/.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants